Skip to content

fix: idempotent lifecycle ops#1303

Open
DominikPildner wants to merge 3 commits intostackitcloud:mainfrom
intive:fix/idempotent-lifecycle-ops
Open

fix: idempotent lifecycle ops#1303
DominikPildner wants to merge 3 commits intostackitcloud:mainfrom
intive:fix/idempotent-lifecycle-ops

Conversation

@DominikPildner
Copy link

Description

This PR brings resource lifecycle operations in line with Terraform plugin framework best practices (see Read and Delete guidelines):

  1. Read with missing ID: When Read is called before Create (e.g. by tools that observe existing infrastructure), resource IDs that are server-assigned will be empty. Previously this caused API errors from requests with empty IDs. Now the resource is gracefully removed from state instead.

  2. Delete of already-deleted resource: When a resource has already been deleted outside of Terraform, Delete now handles the not-found response gracefully instead of returning an error.

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Acceptance tests got implemented or updated (see e.g. here)
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@DominikPildner DominikPildner requested a review from a team as a code owner March 18, 2026 08:03
@DominikPildner DominikPildner changed the title Fix: idempotent lifecycle ops fix: idempotent lifecycle ops Mar 18, 2026
@github-actions
Copy link

This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.

@github-actions github-actions bot added the Stale PR is marked as stale due to inactivity. label Mar 26, 2026
@DominikPildner
Copy link
Author

Hello, is there anything I can do to help move this PR forward? Such as creating a Issue to link to it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale PR is marked as stale due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant